package cn.dong.order.feign.fillback;

import cn.dong.base.dto.MemberDto;
import cn.dong.base.handler.CustomException;
import cn.dong.order.feign.MemberService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class MemberServiceImpl implements MemberService {


    /**
     * 根据会员id获取会员信息，返回dto对象，用于其他服务调用
     *
     * @param id
     * @return
     */
    @Override
    public MemberDto getMemberById(String id) {
        log.error("触发熔断");
        throw new CustomException(40000, "系统繁忙，请稍后重试！");
    }
}
